package com.mt.vsphere.core.conf;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;

public interface SysConfDao extends CrudRepository<SysConf,Integer> {
    SysConf getByName(String name);
    @Modifying
    @Transactional
    @Query("update #{#entityName} set value=?2 where id=?1")
    int updateConfById(int id, String value);

    @Modifying
    @Transactional
    @Query("update #{#entityName} set value=?2 where name=?1")
    int updateGameConfByKey(String key, String value);
}
